<!doctype html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="maximum-scale=1.0,minimum-scale=1.0,user-scalable=0,initial-scale=1.0,width=device-width"/>
    <meta name="format-detection" content="telephone=no,email=no,date=no,address=no">
    <title>大奔农庄</title>
    <link rel="stylesheet" type="text/css" href="../../css/api.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/aui.css"/>
    <link rel="stylesheet" type="text/css" href="../../css/style.css"/>    
    <link rel="stylesheet" href="../../css/swiper.min.css">
    <link rel="stylesheet" href="../../font/iconfont.css">
</head>
<body>
	<div class="aui-content aui-margin-b-15 aui-margin-t-15">
	    <ul class="aui-list aui-list-in">
	    	<li class="aui-list-header" style="background: #fff; border-bottom:1px #ddd solid; font-size: 0.8rem;">个人信息</li>
	        <li class="aui-list-item" onclick="openUpnickname()">
	            <div class="aui-list-item-inner aui-list-item-arrow">
	                <div class="aui-list-item-title db_shezhi_aui-list-item-title">用户名</div>
	                <div class="aui-font-size-12 db_shezhi_aui-list-item-title">修改</div>
	            </div>
	        </li>
	        <li class="aui-list-item" onclick="openAddress()">
	            <div class="aui-list-item-inner aui-list-item-arrow">
	                <div class="aui-list-item-title db_shezhi_aui-list-item-title">收货地址</div>
	                <div class="aui-font-size-12 db_shezhi_aui-list-item-title">管理</div>
	            </div>
	        </li>
	    </ul>
	</div>
	<div class="aui-content aui-margin-t-15">
	    <ul class="aui-list aui-list-in">
	        <li class="aui-list-header" style="background: #fff; border-bottom:1px #ddd solid; font-size: 0.8rem;">安全设置</li>
	        <li class="aui-list-item" onclick="openUppwd()">
	            <div class="aui-list-item-inner aui-list-item-arrow">
	                <div class="aui-list-item-title db_shezhi_aui-list-item-title">登录密码</div>
	                <div class="aui-font-size-12 db_shezhi_aui-list-item-title">修改</div>
	            </div>
	        </li>
	        <li class="aui-list-item" onclick="openUpphone()">
	            <div class="aui-list-item-inner aui-list-item-arrow">
	                <div class="aui-list-item-title db_shezhi_aui-list-item-title">手机绑定</div>
	                <div class="aui-font-size-12 db_shezhi_aui-list-item-title">修改</div>
	            </div>
	        </li>
	    </ul>
	</div>
</body>
<script type="text/javascript" src="../../script/api.js"></script>
<script type="text/javascript" src="../../script/aui-pull-refresh.js"></script>
<script>
var db_key = 'user',db_user;
//页面初始化操作
apiready = function(){
    api.parseTapmode();
    getuser();//获取用户信息    
}
//获取用户储存在本地的数据方法
function getuser() {
    db_user = $api.getStorage(db_key);
}
//打开收货地址
function openUpnickname(){
    if (db_user.islogin) {
		api.openWin({
	        name: 'win_address',
	        url: '../win/address_win.html'
	    });
	}else {
        api.toast({ msg: '请先登录! ' });
        openLogin();
    }  
}
//打开修改登录密码
function openUppwd(){
	if (db_user.islogin) {
		api.openWin({
	        name: 'win_uppwd',
	        url: '../win/uppwd_win.html'
	    });
	}else {
        api.toast({ msg: '请先登录! ' });
        openLogin();
    }  
}
//打开修改昵称
function openUpnickname(){
	if (db_user.islogin) {
		api.openWin({
	        name: 'win_upnickname',
	        url: '../win/upnickname_win.html'
	    });
	}else {
        api.toast({ msg: '请先登录! ' });
        openLogin();
    }  
}
//打开修改手机号码
function openUpphone(){
	if (db_user.islogin) {
		api.openWin({
	        name: 'win_upphone',
	        url: '../win/upphone_win.html'
	    });
	}else {
        api.toast({ msg: '请先登录! ' });
        openLogin();
    }  
}
//打开收货地址列表
function openAddress(){
	if (db_user.islogin) {
		api.openWin({
	        name: 'win_address',
	        url: '../win/address_win.html'
	    });
	}else {
        api.toast({ msg: '请先登录! ' });
        openLogin();
    }  
}
//登录
function openLogin(param) {
	api.openWin({
		name : "win_login",
		url : '../win/login_win.html',
		pageParam: {inself:true,param:param,winname:api.winName}
	});
}
</script>
</html>